//
//  UIFont+FontAdaptive.m
//  自封装头文件
//
//  Created by dllo on 15/10/30.
//  Copyright © 2015年 Wang Jianwei. All rights reserved.
//

#import "UIFont+FontAdaptive.h"
#import "FitHeader.h"
@implementation UIFont (FontAdaptive)
+ (UIFont *)fontWithBold:(BOOL)bold IPhone6sPlus:(NSInteger)iPhone6sPlus Iphone6s:(NSInteger)iPhone6s Iphone5s:(NSInteger)iPhone5s Iphone4s:(NSInteger)iPhone4s
{
    
    NSInteger wordSize = 0;
    switch ((NSInteger)SCREEN_HEIGHT) {
        case 480:
            wordSize = iPhone4s;
            break;
        case 568:
            wordSize = iPhone5s;
            break;
        case 667:
            wordSize = iPhone6s;
            break;
        case 736:
            wordSize = iPhone6sPlus;
            break;
        default:
            break;
    }
    if (bold) {
        return [UIFont fontWithName:@"Helvetica-Bold" size:wordSize];
    }
    return [UIFont systemFontOfSize:wordSize];
}
@end
